<template>
  <div class="AccumulatedBody">
    <div class="bounsList">
      <div v-for="item in levels" :key="item.id" class="item">
        <div class="item-box">
          <div class="box1">
            <NuxtImg src="/images/carteira/rebate_icon.png" alt="" />
            <div class="itemBody">
              <div>
                <p>{{ userStore.moneyUnit }}</p>
                <p>{{ item.reward }}</p>
              </div>
              <div>
                <p>{{ lang.deposit_label }}</p>
                <p>
                  {{ userStore.moneyUnit }}({{ item.active }}/{{
                    item.deposit
                  }})
                </p>
              </div>
            </div>
          </div>
          <div class="btnBox">
            <div class="btn state0">{{ lang.proceed }}</div>
          </div>
        </div>
        <div class="el-progress el-progress--line is-exception el-progress_box">
          <div class="el-progress-bar">
            <div class="el-progress-bar__outer">
              <div
                class="el-progress-bar__inner"
                :style="{ width: `${item.percent}%` }"
              ></div>
            </div>
          </div>
          <div class="el-progress__text">
            <span>{{ item.percent }}%</span>
          </div>
        </div>
      </div>
    </div>
  </div>
  <div class="desc">
    <div class="desc-title">
      <span class="title">{{ lang.desc_title }}</span>
    </div>
    <div class="desc-list">
      <p class="desc-item">{{ lang.desc_1 }}</p>
      <p class="desc-item">{{ lang.desc_2 }}</p>
    </div>
  </div>
</template>

<script setup lang="ts">
const lang: any = getCurrentPageLang("activity/acumulada");
const userStore = useUserStore();

const levels: any = ref([
  { id: 1, reward: 5, active: 10, deposit: 150, percent: 10 },
  { id: 2, reward: 10, active: 20, deposit: 300, percent: 20 },
  { id: 3, reward: 15, active: 30, deposit: 500, percent: 30 },
  { id: 4, reward: 50, active: 40, deposit: 1000, percent: 40 },
  { id: 5, reward: 150, active: 50, deposit: 5000, percent: 50 },
  { id: 6, reward: 1000, active: 60, deposit: 10000, percent: 60 },
  { id: 7, reward: 5000, active: 70, deposit: 100000, percent: 70 },
  { id: 8, reward: 10000, active: 80, deposit: 500000, percent: 80 },
]);
</script>

<style scoped lang="scss">
.AccumulatedBody {
  padding-bottom: var(--footer-padding);
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  align-items: center;
}
.AccumulatedBody .bounsList {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  color: var(--theme-neutral1);
  gap: 0.2rem;
}
.AccumulatedBody .bounsList .item {
  width: 100%;
  height: 2.3rem;
  box-sizing: border-box;
  border-radius: var(--border-radius);
  background: var(--theme-color4);
  padding: 0.4rem 0.2rem;
}
.AccumulatedBody .bounsList .item .item-box {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.AccumulatedBody .bounsList .item .item-box .box1 {
  display: flex;
  align-items: center;
  justify-content: center;
}
.AccumulatedBody .bounsList .item .item-box .box1 img {
  width: 0.98rem;
  height: 0.95rem;
  margin-right: 0.2rem;
}
.AccumulatedBody .bounsList .item .item-box .box1 .itemBody {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: var(--font-size5);
}
.AccumulatedBody .bounsList .item .item-box .box1 .itemBody div:nth-of-type(1) {
  display: flex;
  align-items: center;
  font-size: var(--font-size7);
  margin-bottom: 0.05rem;
}
.AccumulatedBody
  .bounsList
  .item
  .item-box
  .box1
  .itemBody
  div:nth-of-type(1)
  p:nth-of-type(2) {
  font-size: var(--font-title);
  color: var(--theme-neutral1);
  margin-left: 0.2rem;
}
.AccumulatedBody .bounsList .item .item-box .box1 .itemBody div:nth-of-type(2) {
  display: flex;
  align-items: center;
  opacity: 0.8;
}
.AccumulatedBody .bounsList .item .item-box .btnBox .btn {
  font-size: var(--font-size7);
  height: 0.9rem;
  box-sizing: border-box;
  padding: 0 0.4rem;
  color: var(--theme-neutral1);
  background: linear-gradient(
    180deg,
    var(--theme-main-gradient1) 0%,
    var(--theme-main-gradient2) 100%
  );
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 600;
  border-radius: var(--border-radius);
  cursor: pointer;
  opacity: 0.6;
}
.el-progress {
  align-items: center;
  display: flex;
  line-height: 1;
  position: relative;
}
.el-progress_box {
  width: 5rem;
  margin-left: 1rem;
  margin-top: 0.2rem;
}
.el-progress-bar {
  box-sizing: border-box;
  flex-grow: 1;
}
.el-progress-bar__outer {
  background-color: var(--el-border-color-lighter);
  border-radius: 100px;
  height: 6px;
  overflow: hidden;
  position: relative;
  vertical-align: middle;
}
.el-progress_box .el-progress-bar__outer {
  background: var(--theme-black);
  height: 0.2rem !important;
}
.el-progress_box .el-progress-bar__outer {
  height: 0.15rem !important;
}
.el-progress-bar__inner {
  background-color: var(--el-color-primary);
  border-radius: 100px;
  height: 100%;
  left: 0;
  line-height: 1;
  position: absolute;
  text-align: right;
  top: 0;
  transition: width 0.6s ease;
  white-space: nowrap;
}
.el-progress_box .el-progress-bar__outer .el-progress-bar__inner {
  background-color: var(--theme-dec4) !important;
}
.el-progress-bar__inner:after {
  content: "";
  display: inline-block;
  height: 100%;
  vertical-align: middle;
}
.el-progress__text {
  color: var(--el-text-color-regular);
  font-size: 14px;
  line-height: 1;
  margin-left: 5px;
  min-width: 50px;
}
.el-progress_box .el-progress__text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: auto !important;
  font-size: 0.277rem !important;
  color: var(--theme-neutral1) !important;
}
.desc {
  font-weight: 400;
  font-size: 0.35rem;
  margin-top: 0.5rem;
  box-sizing: border-box;
  padding-bottom: 2rem;
}
.desc .desc-title {
  display: flex;
  align-items: center;
  font-family: Arial;
}
.desc .desc-title .title {
  color: var(--theme-neutral1);
  font-size: 0.44rem;
}
.desc .desc-list {
  font-size: 0.34rem;
  color: var(--theme-neutral2);
}
.desc .desc-list .desc-item {
  margin-top: 0.2rem;
  text-indent: -1em;
  padding-left: 1em;
}
</style>
